<?php

use think\facade\Route;


Route::group('admin', function () {
    //预约分类列表
    Route::group('AdminCate', function () {
        Route::any('cateList', 'AdminCate/cateList');
        Route::any('cateAdd', 'AdminCate/cateAdd');
        Route::any('cateUpdate', 'AdminCate/cateUpdate');
        Route::any('cateDel', 'AdminCate/cateDel');

    });

    //预约服务列表
    Route::group('AdminProject', function () {
        Route::any('proList', 'AdminProject/proList');
        Route::any('proAdd', 'AdminProject/proAdd');
        Route::any('returnData', 'AdminProject/returnData');
        Route::any('getTimes', 'AdminProject/getTimes');
        Route::any('prodelete', 'AdminProject/prodelete');
        Route::any('proUpdate', 'AdminProject/proUpdate');
        Route::any('changeStatus', 'AdminProject/changeStatus');
        Route::any('proSetting', 'AdminProject/proSetting');
        Route::any('appConfig', 'AdminProject/appConfig');
        Route::any('formatRange', 'AdminProject/formatRange');
    });


    //预约记录列表
    Route::group('AdminRecord', function () {
        Route::any('recordList', 'AdminRecord/recordList');
    });

    //预约记录列表
    Route::group('AdminQuestion', function () {
        //问卷列表
        Route::any('questionList', 'AdminQuestion/questionList');
        //添加问卷
        Route::any('questionAdd', 'AdminQuestion/questionAdd');
        //问卷详情
        Route::any('questionInfo', 'AdminQuestion/questionInfo');
        //编辑问卷
        Route::any('questionUpdate', 'AdminQuestion/questionUpdate');
        //添加每道题的内容
        Route::any('queTextAdd', 'AdminQuestion/queTextAdd');

        Route::any('textListInfo', 'AdminQuestion/textListInfo');

        Route::any('queTextUpdate', 'AdminQuestion/queTextUpdate');

        Route::any('jumpSelectText', 'AdminQuestion/jumpSelectText');

        Route::any('queTextDel', 'AdminQuestion/queTextDel');
        //后台问卷统计
        Route::any('queForm', 'AdminQuestion/queForm');

        Route::any('queExcel', 'AdminQuestion/queExcel');
        //用户提交问卷详情
        Route::any('userQueInfo', 'AdminQuestion/userQueInfo');
    });


});


Route::group('app', function () {
    //预约首页
    Route::group('IndexProject', function () {
        Route::any('index', 'IndexProject/index');
        Route::any('proList', 'IndexProject/proList');
        Route::any('proInfo', 'IndexProject/proInfo');
        Route::any('projectQr', 'IndexProject/projectQr');
    });


    //预约首页
    Route::group('IndexRecord', function () {
        Route::any('recordAdd', 'IndexRecord/recordAdd');
        Route::any('recordList', 'IndexRecord/recordList');
        Route::any('recordInfo', 'IndexRecord/recordInfo');
        Route::any('recordChange', 'IndexRecord/recordChange');
    });



    Route::group('IndexQuestion', function () {
        //问卷列表
        Route::any('questionList', 'IndexQuestion/questionList');
        //问卷详情
        Route::any('questionInfo', 'IndexQuestion/questionInfo');
        //问卷题目 传id就查该id的 不传默认查第一道题，必传参数：que_id（问卷id）；icon（这个参数是我返回给你的，只有第一道题的时候不用传，后面都要传）
        Route::any('selectQueText', 'IndexQuestion/selectQueText');
        //开始答题，id 问卷的id
        Route::post('startText', 'IndexQuestion/startText');
        //提交每一道问题，user_text_id： 开始答题的时候 我返回给你的id，text_id:题目的id，icon：我返回给你的那个icon，ans_id 回答的答案的id;填空题的时候传一下ans_text
        Route::post('textAdd', 'IndexQuestion/textAdd');

        Route::post('userTextList', 'IndexQuestion/userTextList');

    });


});






//======================================================oldapi


//预约首页
Route::group('IndexProject', function () {
    Route::any('index', 'IndexProject/index');
    Route::any('proList', 'IndexProject/proList');
    Route::any('proInfo', 'IndexProject/proInfo');
    Route::any('projectQr', 'IndexProject/projectQr');
});


//预约首页
Route::group('IndexRecord', function () {
    Route::any('recordAdd', 'IndexRecord/recordAdd');
    Route::any('recordList', 'IndexRecord/recordList');
    Route::any('recordInfo', 'IndexRecord/recordInfo');
    Route::any('recordChange', 'IndexRecord/recordChange');
});


//预约分类列表
Route::group('AdminCate', function () {
    Route::any('cateList', 'AdminCate/cateList');
    Route::any('cateAdd', 'AdminCate/cateAdd');
    Route::any('cateUpdate', 'AdminCate/cateUpdate');
    Route::any('cateDel', 'AdminCate/cateDel');
});

//预约服务列表
Route::group('AdminProject', function () {
    Route::any('proList', 'AdminProject/proList');
    Route::any('proAdd', 'AdminProject/proAdd');
    Route::any('returnData', 'AdminProject/returnData');
    Route::any('getTimes', 'AdminProject/getTimes');
    Route::any('prodelete', 'AdminProject/prodelete');
    Route::any('proUpdate', 'AdminProject/proUpdate');
    Route::any('changeStatus', 'AdminProject/changeStatus');
    Route::any('proSetting', 'AdminProject/proSetting');
    Route::any('appConfig', 'AdminProject/appConfig');
    Route::any('formatRange', 'AdminProject/formatRange');
});


//预约记录列表
Route::group('AdminRecord', function () {
    Route::any('recordList', 'AdminRecord/recordList');
});


